package io.mft.commons.config.datasource;

import cn.hutool.json.JSONUtil;
import io.mft.commons.function.response.kv.KVMap;
import io.mft.commons.util.Unique;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
public class DatasourceConfig implements Unique{

	private String id="";
	private KVMap config;
	private String desc="";
	private String ownerPluginId;
	private String refDatasoueceId;
	@Override
	public String uniqueId() {
		String cid="";
		if (config!=null) {
			cid=JSONUtil.toJsonStr(config);
		}
		return id+"-"+cid+"-"+desc;
	}
}
